import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
    // 存放数据信息
    state () {
        return {
            token : {},
            user : {},
        }
    },
    // 数据操作通道
    mutations: {
        setToken (state, token) {
            // state.token = token;
            // localStorage.setItem("token",token);
        },
        removeToken (state,token) {
            // state.token = null;
            // localStorage.removeItem("token");
        }
    }
})

